using System;
using System.Collections.Generic;
using System.Text;
using MyPhotoIndex.Interfaces.FileSearch;
using System.IO;

namespace MyPhotoIndex.Utilities.FileSearch
{
    public class FileSizeFileSearchFilter : IFileSearchFilter
    {
        private int m_sizeKb;

        #region IFileSearchFilter Members

        public FileSizeFileSearchFilter(int sizeKb)
        {
            m_sizeKb = sizeKb;
        }

        public bool Check(FileInfo fileInfo)
        {
            if(fileInfo.Length > (m_sizeKb * 1024))
            {
                return true;
            }

            return false;
        }

        #endregion
    }
}
